Motor control device and air conditioner

ABSTRACT

A motor control device includes a PWM signal generation unit configured to increase/decrease a duty in both directions of phase lag side and phase lead side regarding a first phase of three-phase PWM signal pattern. The PWM signal generation unit is configured to increase/decrease a duty in one of the directions of phase lag side and phase lead side regarding a second phase. The PWM signal generation unit is configured to increase/decrease a duty in a direction opposite to that of the second phase with reference to any phase of the carrier-wave period regarding a third phase. A timing point adjusting unit is configured to detect two-phase currents at timing points fixed in the carrier-wave period and to adjust a detection timing point so that the current is detectable at a variable timing point regarding at least one phase when the two-phase currents become undetectable at the fixed timing points.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is based upon and claims the benefit of priority fromthe prior Japanese Patent Application No. 2014-043891 filed on Mar. 6,2014, the entire contents of which are incorporated herein by reference.

FIELD

Embodiments described herein relate to a motor control devicecontrolling an electric motor via an inverter circuit by PWM controllinga plurality of switching elements connected into a three-phase bridgeconfiguration and an air conditioner provided with the motor controldevice.

BACKGROUND

A technique has conventionally been known that an electric current isdetected using one shunt resistance inserted into a direct-current partof an inverter circuit when U-, V- and W-phase currents are detected forthe purpose of controlling an electric motor. In order that all thethree-phase currents may be detected in the above-mentioned manner, athree-phase PWM (pulse width modulation) signal pattern needs to begenerated in one period of a PWM carrier so that two or more phasecurrents are detectable. For this purpose, a motor control device hasbeen conventionally proposed which can normally detect two or more phasecurrents by shifting a phase of the PWM signal in one period of the PWMcarrier, without increase in noise. See Japanese Patent No. 5178799, thecontents of which are incorporated herein by reference.

However, the above-described conventional current detection mannerresults in a problem that only one phase current can be detected in twooccurrences of current detection timing in a region where a modulationfactor is increased.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a functional block diagram showing an electrical arrangementof the motor control device of a first embodiment;

FIG. 2 is a schematic diagram showing an arrangement of heat pumpsystem;

FIG. 3 is a flowchart showing interrupt processing executed at intervalsof half period of the carrier;

FIGS. 4A and 4B show lapse of execution time of the processing as shownin FIG. 3 together with a PWM carrier wave;

FIG. 5 shows an output phase of three-phase PWM duty pulse;

FIG. 6 is a flowchart (No. 1) showing contents of processing at step S11in FIG. 3;

FIG. 7 is also a flowchart (No. 2) showing contents of processing atstep S11 in FIG. 3;

FIGS. 8A and 8B show examples (No. 1) of two-phase PWM pulse waveformsand current detection timing corresponding to patterns 1 to 9 divided bythe processing of FIGS. 6 and 7 respectively;

FIG. 9 also shows examples (No. 2) of two-phase PWM pulse waveforms andcurrent detection timing points corresponding to patterns 1 to 9 dividedby the processing of FIGS. 6 and 7 respectively;

FIG. 10 shows three-phase PWM signal waveforms and shifts in thepatterns (0 to 9);

FIG. 11 is a flowchart (No. 1) showing contents of processing at stepS12 in FIG. 3;

FIG. 12 is a flowchart (No. 2) showing contents of processing at stepS12 in FIG. 3;

FIGS. 13A and 13B show definitions of U0, V0 and W0 and V0_bai andW0_bai;

FIG. 14 is a flowchart (No. 1) showing contents of processing at step S3in FIG. 3;

FIG. 15 is a flowchart (No. 2) showing contents of processing at step S3in FIG. 3;

FIGS. 16A to 16D are explanatory diagrams of a problem in theconventional art;

FIGS. 17A to 17C are explanatory diagrams of operation and effect of theembodiment;

FIGS. 18A and 18B show changes in current waveforms according to changesin motor speed in the conventional art and the embodiment;

FIGS. 19A to 19C illustrate a second embodiment, showing a case wherethree-phase modulation PWM signals are changed to two-phase modulationPWM signals in patterns 1, 3 and 5;

FIGS. 20A to 20C are similar to FIGS. 19A to 19C, showing a case inpatterns 7 and 9;

FIG. 21 is a flowchart showing interrupt processing carried out everyhalf period of the carrier;

FIG. 22 is a flowchart (No. 1) showing processing contents of step S15;

FIG. 23 is a flowchart (No. 2) showing processing contents of step S15;

FIG. 24 is a flowchart (No. 1) showing processing contents of step S12;

FIG. 25 is a flowchart (No. 2) showing processing contents of step S12;

FIG. 26 is a flowchart (No. 3) showing processing contents of step S12;

FIG. 27 is a flowchart showing processing contents of step S3;

FIG. 28 is a flowchart showing processing contents of step S16;

FIG. 29 shows examples of PWM pulse waveforms and current detectiontiming in the case where patterns 7 to 9 to be divided by the processingof FIGS. 22 and 23 are divided into channel patterns 7 to 9 and 0 (No.1);

FIG. 30 is a view similar to FIG. 29 (No. 2);

FIG. 31 show phase PWM signal waveforms in the case where three-phasemodulation and two-phase modulation are carried out by mixture;

FIGS. 32A and 32B show changes in current waveforms according to changesin motor speed in the conventional art and the embodiment respectively;

FIGS. 33A and 33B explain the operation of a third embodiment (No. 1);

FIGS. 34A and 34B explain the operation of the third embodiment (No. 2);

FIGS. 35A and 35B explain the operation of the third embodiment (No. 3);

FIG. 36 is a flowchart similar to FIG. 22;

FIG. 37 is a flowchart similar to FIG. 24;

FIG. 38 is a flowchart similar to FIG. 25;

FIG. 39 is a flowchart (No. 1) similar to FIG. 28;

FIG. 40 is a flowchart (No. 2) similar to FIG. 28;

FIG. 41 is a flowchart showing the processing at step S9 in more detail;

FIG. 42 is a flowchart showing the processing at step S10 in moredetail; and

FIGS. 43A and 43B show three-phase PWM pattern in the case where theprocessing in the third embodiment is applied to a practical case.

DETAILED DESCRIPTION

In general, according to one embodiment, a motor control device includesa current detecting element connected to a direct current side of aninverter circuit including a plurality of switching elements connectedinto a three-phase bridge configuration, the switching elements beingconfigured to be on-off controlled according to a predetermined PWMsignal pattern so that the inverter circuit converts direct current tothree-phase alternating current, the current detecting elementgenerating a signal corresponding to a current value. A rotor positiondetermination unit is configured to determine a rotor position based onphase currents of an electric motor driven by the inverter circuit. APWM signal generation unit is configured to generate a three-phase PWMsignal pattern so that the pattern follows the rotor position. A currentdetection unit is configured to detect the phase currents based on asignal generated by the current detecting element and the PWM signalpattern. The PWM signal generation unit is configured toincrease/decrease a duty in both directions of phase lag side and phaselead side with reference to any phase of the carrier-wave periodregarding a first phase of the three-phase PWM signal pattern. The PWMsignal generation unit is configured to increase/decrease a duty in oneof the directions of phase lag side and phase lead side with referenceto any phase of the carrier-wave period regarding a second phase of thethree-phase PWM signal pattern. The PWM signal generation unit isconfigured to increase/decrease a duty in a direction opposite to thedirection of the second phase with reference to any phase of thecarrier-wave period regarding a third phase of the three-phase PWMsignal pattern. The current detection unit has a timing point adjustingunit configured to detect two-phase currents at timing points fixed inthe carrier-wave period of the PWM signal and to adjust a detectiontiming point so that the current is detectable at a variable timingpoint according to a magnitude of an output voltage supplied to theinverter circuit regarding at least one phase when the two-phasecurrents become undetectable at the fixed timing points.

A first embodiment will be described with reference to FIGS. 1 to 18B.The first embodiment is directed to an air conditioner employing a heatpump system and including a compressor motor. Referring to FIG. 2, acompressor (a load) 2 composing a heat pump system 1 includes acompression part 3 and an electric motor 4 both of which are housed in asingle iron closed container 5. The motor 4 includes a rotor shaftconnected to the compression part 3. The compressor 2, a four-way valve6, an indoor heat exchanger 7, a decompressor 8 and an outdoor heatexchanger 9 are connected to one another by pipes serving as aheat-transfer medium flow passage into a closed loop. The compressor 2is of a rotary type and the motor 4 is a three-phase IPM (interiorpermanent magnet) motor (a brushless DC motor, for example). An airconditioner E incorporates the above-described heat pump system 1.

The four-way valve 6 in a heating operation is shown by a solid line inFIG. 2. A high-temperature refrigerant compressed by the compressionpart 3 of the compressor 2 is supplied via the four-way valve 6 to theindoor heat exchanger 7 thereby to be condensed. The condensedrefrigerant is subsequently decompressed by the decompressor 8 into thelow-temperature refrigerant, flowing into the outdoor heat exchanger 9.The refrigerant is evaporated in the outdoor heat exchanger and returnedto the compressor 2. On the other hand, the four-way valve 6 in acooling operation is switched to the state as shown by broken line inFIG. 2. As a result, the high-temperature refrigerant compressed by thecompression part 3 is supplied via the four-way valve 6 to the outdoorheat exchanger 9 to be condensed. The condensed refrigerant issubsequently decompressed by the decompressor 8 into the low-temperaturerefrigerant, flowing into the indoor heat exchanger 7. The refrigerantis evaporated in the indoor heat exchanger 7 and returned to thecompressor 2. Fans 10 and 11 are driven to supply air into the indoorand outdoor heat exchangers 7 and 9 respectively. Heat exchange betweenthe heat exchangers 7 and 9 and indoor air and outdoor air isefficiently carried out by the blowing operations of the fans 10 and 11.

Referring to FIG. 1, a functional electrical arrangement of the motorcontrol device is shown. Although a DC power supply 21 is designated bya symbol of DC power supply, the DC power supply 21 includes a rectifiercircuit, a smoothing capacitor and the like when a DC power supply isgenerated from a commercial AC power supply. An inverter circuit (aDC-AC converter) 23 is connected via a positive bus bar 22 a and anegative bus bar 22 b to the DC power supply 21. A shunt resistance 24serving as a current detecting element is inserted to the negative busbar 22 b side. The inverter circuit 23 includes N-channel type powerMOSFETs 25 (U+, V+, W+, U−, V−, W−) which serve as switching elementsand are connected into a three-phase bridge configuration. Three-phaseoutput terminals are connected to phase windings of the motor 4respectively.

A terminal voltage (a signal corresponding to a current value) of theshunt resistance (the current detecting element) 24 is detected by acurrent detecting section 27 (a current detecting unit). When A/Dconverting and then reading the terminal voltage, the current detectingsection 27 detects U-phase, V-phase and W-phase currents Iu, Iv and Iwbased on a two-phase or three-phase PWM signal pattern delivered to theinverter circuit 3. The phase currents detected by the current detectingsection 27 are supplied to a vector control section 30 (a rotor positiondetermining unit and a PWM signal generating unit).

When supplied with a rotating speed command ω_(ref) of the motor 4 froma function section such as a microcomputer which sets controlconditions, the vector control section 30 generates a torque currentcommand Iq_(ref), based on a difference between the rotating speedcommand ω_(ref) and an estimated actual rotating speed of the motor 4. Arotor position θ of the motor 4 depends upon the phase currents Iu, Ivand Iw of the motor 4. A torque current Iq and an excitation currentI_(d) are calculated by vector operation using the rotor position θ. Avoltage command Vq is generated by proportional-integral (PI) controloperation of the difference between the torque current command Iq_(ref)and the torque current Iq, for example. A voltage command Vd isgenerated by the same processing as applied to the excitation currentI_(d). The voltage commands Vq and Vd are converted to three-phasevoltages Vu, Vv and Vw using the rotor position θ. The three-phasevoltages Vu, Vv and Vw are supplied to a DUTY generating section (a PWMsignal generating unit) 31, so that duties U_DUTY, V_DUTY and W_DUTY togenerate respective phase PWM signals are determined.

The three-phase duties U_DUTY, V_DUTY and W_DUTY are supplied to a PWMsignal generation section (a PWM signal generation unit) 32 to becompared with a level of carrier, so that three-phase PWM signals aregenerated. Further, lower arm side signals are also generated byinverting the three-phase PWM signals. Dead time is added to thegenerated signals if necessary, and the signals are supplied to a drivecircuit 33. According to the supplied PWM signals, the drive circuit 33supplies gate signals to gates of the power MOSFETs 25 (U+, V+, W+, U−,V− and W−) composing the inverter circuit 23. Gate signals boosted by anecessary level are supplied to an upper arm side. A manner of the PWMsignal generation section 32 generating the three-phase PWM signals isdisclosed as a manner of a fourth embodiment in the above-mentionedJapanese Patent No. 5178799.

A current detection timing point adjusting section 34 is disposedbetween the PWM signal generation section 32 and the current detectingsection 27. Based on the carrier supplied from the PWM signal generationsection 32 and the information supplied from the vector control section30, the current detection timing point adjusting section 34 determinestiming points for the current detecting section 27 to detect two-phasecurrents within a carrier period, supplying the timing points to thecurrent detecting section 27. The current detecting section 27 performsA/D conversion of the terminal voltage of the shunt resistance 24 at thetiming points supplied from the current detection timing point adjustingsection 34. In the foregoing description, functions of theconfigurations 27, 30 to 32 and 34 are realized by hardware and softwareof the microcomputer including a CPU.

The operation of the embodiment will now be described with reference toFIGS. 3 to 25. FIG. 3 shows interrupt processing executed in every halfperiod of carrier. More specifically, PWM interrupt takes place at peakand bottom of a carrier or triangular amplitude. Firstly, it isdetermined whether or not the flag M_INT_flg=0 (reset; S1). When theflag is 0, data A/D converted in the current detecting section 27 isextracted (S2). Three-phase currents are detected based on the extracteddata (S3). “Start C” processing which will be described later isexecuted at step S3.

A/D conversion of the terminal voltage of the shunt resistance 24 in thecurrent detecting section 27 is executed twice within one carrier periodindependent of the processing shown in FIG. 3 (execution timing will bedescribed later). The A/D converted data is stored in a register or thelike. Accordingly, data stored in the register is read in the processingat step S2.

Subsequently, a rotor position (θ) of the motor 4 is estimated from thethree-phase currents by a vector-controlled calculation (S4), andfrequency control (speed control, S5) and current control (PI control orthe like) are executed (S6). The flag M_Int_flg is set to 1 (S7).Processing at subsequent steps S8 to S11 is executed by the DUTYgenerating section 31. The DUTY generating section 31 refers to a valueof a carrier counter supplied from the PWM signal generation section 32to determine whether or not count-up or count-down is in execution (S8).When count-up is in execution, an index D_Pwm_set_(—)2( ) is set (S9).When count-down is in execution, an index D_Pwm_set_(—)1( ) is set(S10). These indexes will be described later with reference to FIGS. 4and 5. Start A and start B are then executed (S11 and S12).

Further, when the flag M_Int_flg is set to 1 at step S1 (NO),three-phase PWM signals are supplied (S13) and the flag M_Int_flg is setto 0 (S14). The control sequence then proceeds to step S8.

FIGS. 4A and 4B show an execution time image of the interrupt processingtogether with the PWM carrier waveform. In the air conditioner, a singlecontrol circuit (microcomputer) controls an electric motor driving thefan 11 of the heat exchanger 9 corresponding to outdoor equipment inparallel with the compressor 2. An electric motor driving a fan 10 ofthe heat exchanger 7 corresponding to indoor equipment is controlled byanother control circuit, driver IC or the like.

FIG. 4 shows, in part (a), processing times (1) to (4) regarding controlof the motor of the compressor 2 as shown in FIG. 3 and, in part (b), aprocessing time (5) regarding control of the motor (fan motor) of theabove-described fan 11. More specifically, when the PWM interrupt takesplace at the bottom of the triangular wave amplitude, motor current isdetected and vector control is carried out regarding the fan motor afterexecution of the processing shown in FIG. 3. FIGS. 4A and 4B showprocesses (1) to (4) designated by encircled numbers. Processes (1) and(3) correspond to steps S2 to S8, and processes (2) and (4) correspondto steps S9 and S10 respectively. In this case, the fan motor control(5) is carried out after execution of process (4).

FIG. 5 shows output phases of respective phase PWM duty pulses. Theterm, “duty” will sometimes be used to mean “duty pulse” in thefollowing description. A control manner as disclosed by Japanese PatentNo. 5178799, the contents of which are incorporated herein by reference,is employed as described above. More specifically, regarding a first oneof three phases, the duty is increased/decreased in both directions ofphase lag side and phase lead side with reference to the bottom of thetriangular wave amplitude. Regarding a second phase, the duty isincreased/decreased, for example, to the phase lead side with referenceto the aforesaid bottom. Regarding a third phase, the duty isincreased/decreased to the phase lag side with reference to theaforesaid bottom. Although the first, second and third phases correspondto U, V and W phases respectively in the example, the correspondencerelationship is optional. The carrier counter is under a count-downoperation when an interrupt takes place at a peak of the triangular waveamplitude. As a result, duty pulses for a first half of the currentcarrier period are output by D_Pwm_set_(—)2( ). Duty values of the U, Vand W phases are obtained by doubling the duty values calculated byvector control.

Regarding the U phase, pulses of half duty are delivered in a periodstarting from the time after the interrupt at the peak of the triangularwave amplitude to the bottom. Regarding the V phase, when duty is lessthan 50%, the pulses are output in a period starting from the time afterthe interrupt at the peak of the triangular wave amplitude to the bottomin the same manner with respect to the U phase. Further, regarding the Wphase, when duty exceeds 50%, pulses of an excess are supplied in aperiod starting from the timing of interrupt at the peak to the bottom.Accordingly, these pulses are output by D_Pwm_set_(—)2( ).

On the other hand, the carrier counter is under a count-up operationwhen an interrupt takes place at a bottom of the triangular waveamplitude. As a result, duty pulses for a latter half of the currentcarrier period are output by D_Pwm_set_(—)1( ). Regarding the U phase,pulses of half duty are output in a period starting from the time afterthe interrupt at the bottom of the triangular wave amplitude to the peakin the same manner as in the first half period. Regarding the V phase,when duty exceeds 50%, the pulses corresponding to the excess are outputin a period starting from the time after the interrupt at the bottom ofthe triangular wave amplitude to the peak. Further, regarding the Wphase, when duty is less than 50%, pulses are output in a periodstarting from the timing of interrupt at the bottom to the peak.Accordingly, these pulses are output by D_Pwm_set_(—)1( ).

Next, processing (Start A) at step S11 will be described with referenceto FIGS. 6 and 7. In the processing, three-phase duty pulses are dividedinto patterns (0) to (9) depending upon a magnitude relation ofrespective phase duty pulses in the three-phase modulated PWM signals.These patterns will be shown as variables Ptns in the processing whichwill be described later. The pattern division is based on the followingconditions.

In the current detecting section 27, a minimum duty refers to acurrent-detectable minimum duty, and a maximum width refers to a resultof subtraction of the minimum width from maximum duty (100%). Forexample, when the current-detectable minimum time is 10 μs and thecarrier frequency is 4 kHz, the minimum width is set to 4% and themaximum width is set to 96%. A three-phase PWM signal output pattern isdivided into the following combinations of U-, V- and W-phase duties:

(1) a case where the U-phase is less than the minimum width, and theV-phase is larger than the W-phase or equal to or larger than themaximum width, and the W-phase is larger than the U-phase;

(2) a case where the U-phase is less than the minimum width, and theW-phase is larger than the V-phase or equal to or larger than themaximum width, and the V-phase is larger than the U-phase;

(3) a case where the V-phase is less than the minimum width, and theU-phase is larger than the W-phase;

(4) a case where the V-phase is less than the minimum width, and theW-phase is larger than the U-phase or equal to or larger than themaximum width, and the U-phase is larger than the V-phase;

(5) a case where the W-phase is less than the minimum width and theU-phase is larger than the V-phase;

(6) a case where the W-phase is less than the minimum width, and theV-phase is larger than the U-phase or equal to or larger than themaximum width, and the W-phase is smaller than the U-phase;

(7) a case where the U-phase and the V-phase are equal to or larger thanthe maximum width;

(8) a case where the U-phase and the W-phase are equal to or larger thanthe maximum width;

(9) a case where the V-phase and the W-phase are equal to or larger thanthe maximum width; and

-   -   (0) any case other than the cases (1) to (9).

At steps S21 to S33 shown in FIGS. 6 and 7, patterns (variables Ptns)(0) to (9) are distinguished according to the above-describedconditions. FIGS. 8 and 9 show three-phase PWM signal patternscorresponding to the aforementioned patterns (1) to (9). FIG. 10 showchanges in the patterns (0) to (9) according to actual changes in thethree-phase PWM signal pattern.

FIGS. 11 and 12 show the processing (Start B) at step S12 in moredetail. In the processing, the current detecting section 27 determinestiming points for A/D conversion of the terminal voltage of the shuntresistance 24 within the carrier period. The timing points for A/Dconversion are determined with respect to each one of a count-downperiod from the peak of carrier period to a half period (the bottom) andan upcount period from the half period to an end of the period. Theformer serves as a first detection timing point and the latter serves asa second detection timing point.

Symbols U0, V0 and W0 in FIG. 11 designate time periods corresponding toone halves of U-, V- and W-phase duties initially determined with themidpoint (bottom) of the carrier period serving as a base point, asshown in FIG. 13A. Symbols V0_bai, W0_bai in FIG. 13B correspond topulse lengths extending with the midpoint of the carrier period servinga midpoint when V-phase and W-phase duty pulse are shifted in order thatthree-phase PWM signals may be output in the patterns as shown in FIG.5.

FIGS. 14 and 15 show the processing (Start C) at step S3 in more detail.In the processing, the current detecting section 27 performs an A/Dconversion of two of three phases according to the patterns (0) to (9).It is further shown whether or not the other phase is obtained bycalculation.

FIGS. 8 and 9 show timing points of A/D conversion and current phasesdetected by the A/D conversion for every one of patterns (0) to (9).

<Pattern 1>→Steps S42 and S62

A first detection timing point is set to (U0+minimum width (variable))and serves to detect a V-phase current.

A second detection timing point is set to (W0_bai−minimum width(variable)) and serves to detect a U-phase current (negative).

At step S62, an A/D converted value (an AD value) of the U-phase with aminus sign (−) is substituted for the variable R_Iu and an A/D convertedvalue (an AD value) of the V-phase is substituted for the variable R_Iv.A W-phase current R_Iw is obtained by R_Iw=−R_Iu−R_Iv.

The advantageous effects of the foregoing operation will be describedwith reference to FIGS. 16A to 16D and 17A to 17C. When the three-phasePWM pulses have respective intermediate widths as in Japanese Patent No.518799 shown in FIG. 16A, two-phase currents (W-phase and V-phase bothnegative) can be detected at two fixed timing points respectively. Whenthe motor 4 gets into a state of pattern (1) with the timing pointsbeing maintained, a V-phase current is detected at the first timingpoint and a U-phase current (negative) is detected at the second timingpoint, as shown in FIG. 16B. Accordingly, a detection phase in this casediffers from that in the case as shown in FIG. 16A.

In view of the foregoing, both of first and second timing points arerendered variable regarding pattern (1) as shown in FIG. 17A. Thedetection phase as shown in FIG. 17A is the same as in the case wherethe detection timing points are fixed. However, the detection timingpoints are rendered variable in order that the detection phase may bealigned with the V-phase and the U-phase (negative) in considerationwith the other case of pattern (1) as shown in FIG. 8A.

<Pattern (2)>→Steps S44 and S64

The first detection timing point is set to (V0_bai−minimum width(variable)) and serves to detect the U-phase current (negative).

The second detection timing point is set to (U0+minimum width(variable)) and serves to detect the W phase current.

At step S64, an A/D converted value of the U-phase with a minus sign (−)is substituted for the variable R_Iu and an A/D converted value of theW-phase is substituted for a W-phase current R_Iw. A V-phase currentR_Iv is obtained by R_Iv=−R_Iw−R_Iu.

<Pattern (3)>→Steps S46 and S66

The first detection timing point is set to (V0_bai+minimum width(variable)) and serves to detect the U-phase current.

The second detection timing point is set to the minimum width (fixed)and serves to detect the V-phase current (negative).

At step S66, an A/D converted value of the V-phase with a minus sign (−)is substituted for the variable R_Iv and an A/D converted value of theU-phase is substituted for a U-phase current R_Iu. A W-phase currentR_Iw is obtained by R_Iw=−R_Iv−R_Iu.

<Pattern (4)>→Steps S48 and S68

The first detection timing point is set to (U0+minimum width (variable))and serves to detect the W-phase current.

The second detection timing point is set to the minimum width (fixed)and serves to detect the V-phase current (negative).

At step S68, an A/D converted value of the V-phase with a minus sign (−)is substituted for the variable R_Iv and an A/D converted value of theW-phase is substituted for a variable R_Iw. A U-phase current R_Iu isobtained by R_Iu=−R_Iv−R_Iw.

Since both detection timing points are fixed in pattern (4), the V-phasecurrent (negative) is detected at both detection timing points, as shownin FIG. 17B. In view of this, the first detection timing point isrendered variable, so that the W-phase current is detected at the firstdetection timing point.

<Pattern 5>→Steps S50 and S70

The first detection timing point is set to the minimum width (fixed) andserves to detect the W-phase current (negative).

The second detection timing point is set to (W0_bai+minimum width(variable)) and serves to detect a U-phase current.

At step S70, an A/D converted value of the U-phase is substituted forthe variable R_Iu and an A/D converted value of the W-phase with a minussign (−) is substituted for the variable R_Iw. A V-phase current R_Iv isobtained by R_Iv=−R_Iu−R_Iw.

<Pattern (6)>→S52 and S72

The first detection timing point is set to (U0−minimum width (variable)and serves to detect the W-phase current (negative).

The second detection timing point is set to (U0+minimum width(variable)) and serves to detect a V-phase current.

At step S72, an A/D converted value of the V-phase is substituted forthe variable R_Iv and an A/D converted value of the W-phase with a minussign (−) is substituted for the variable R_Iw. A U-phase current R_Iu isobtained by R_Iu=−R_Iv−R_Iw.

Since both detection timing points are fixed in pattern (6), the W-phasecurrent (negative) is detected at both detection timing points, as shownin FIG. 17C. In view of this, the first and second detection timingpoints are rendered variable, so that the V-phase current is detected atthe second side.

The following patterns (7) to (9) are directed to detection of a singlephase current.

<Pattern (7)>→Steps S54 and S74

The first detection timing point is set to the minimum width (fixed) andserves to detect a W-phase current (negative).

The second detection timing point is not set since a second phasecurrent cannot be detected in this case.

Accordingly, at step S74, 0 is substituted for both variables R_Iu andR_Iv and an A/D converted value of the W-phase with a minus sign issubstituted for the variable R_Iw.

<Pattern (8)>→Steps S56 and S76

The first detection timing point is not detected since a first phasecurrent cannot be detected.

The second detection timing point is set to the minimum width (fixed)and serves to detect a V-phase current (negative).

Accordingly, at step S76, 0 is substituted for both variables R_Iu andR_Iw, and an A/D converted value of the V-phase with a minus sign issubstituted for the variable R_Iv.

<Pattern (9)>→Steps S58 and S78

The first detection timing point is not set since a first phase currentcannot be detected in this case.

The second detection timing point is set to twice the minimum width(fixed) and serves to detect a U-phase current (negative). Accordingly,at step S78, 0 is substituted for both variables R_Iv and R_Iw, and anA/D converted value of the U-phase with a minus sign is substituted forthe variable R_Iu.

Setting the second detection timing point to twice the minimum widthdiffers from a fixed timing point set to another minimum width. However,the appended claims define “a variable timing point according to amagnitude of output voltage supplied to the inverter circuit.” In lightof the definition, setting to twice the minimum width does not fallwithin the notion of “variable” and is accordingly determined as“fixed.”

<Pattern (0)>→Steps S59 and S79

The first detection timing point is set to the minimum width (fixed) andserves to detect a V-phase current (negative).

The second detection timing point is set to the minimum width (fixed)and serves to detect a W-phase current (negative). See FIG. 16A. At stepS79, an A/D converted value of the V-phase with a minus sign issubstituted for the variable R_Iv, and an A/D converted value of theW-phase with a minus sign is substituted for variable R_Iw. A U-phasecurrent R_Iu is obtained by R_Iu=−R_Iv−R_Iw.

FIGS. 18A and 18B show (A) motor current waveforms detected by theconventional art method (Japanese Patent No. 5178799) and (B) motorcurrent waveforms detected by the method of the embodiment when amodulation factor is substantially 1.0. As understood from the figures,in the conventional art, a current detection rate drops and currentwaveform distortion becomes larger as an applied voltage rises with theresult that the motor speed is increased. On the other hand, the currentdetection rate is maintained at a high value irrespective of the appliedvoltage in the embodiment, so that the current waveform has lessdistortion and is substantially sinusoidal.

According to the foregoing embodiment, the shunt resistance 24 connectedto the direct current side of the inverter circuit 23 generates signalsaccording to current values. The current detection section 27 detectsthe phase currents Iu, Iv and Iw of the motor 4, based on the signalsgenerated by the shunt resistance 24 and the PWM signal pattern. Thevector control section 30 determines the rotor position based on thephase currents and generates the three-phase PWM signal pattern inassociation with the PWM signal generation section 32 so that thepattern follows the rotor position θ. In this case, regarding theU-phase of the three-phase PWM signal pattern, the PWM signal generationsection 32 increases/decreases the duty in both directions of phase lagside and phase lead side with reference to the bottom of the carrierperiod. Regarding the V-phase, the PWM signal generation section 32increases/decreases the duty in one of both directions of phase lag sideand phase lead side with reference to the bottom. Regarding the W-phase,the PWM signal generation section 32 increases/decreases the duty in theother of both directions of phase lag side and phase lead side withreference to the bottom.

The current detection timing point adjusting section 34 detectstwo-phase currents at the fixed timing points within the carrier period.Further, when detection of two-phase currents at the fixed timing pointsbecomes impossible, the current detection timing point adjusting section34 adjusts the detection timing points so that regarding at least onephase, the current can be detected at a variable timing point accordingto the magnitude of output voltage supplied to the inverter circuit 23.Accordingly, the current detection rate can be improved even in a regionwhere the output voltage is high so that overmodulation occurs, with theresult that the control accuracy can be improved while the switchingloss is suppressed.

The adjusting section 34 further determines whether or not predeterminedfixed timing points should be employed or timing points obtained byshifting the fixed timing points should be employed, according to thethree-phase PWM signal pattern. More specifically, the minimum width isdetermined as a minimum duty allowing the current detection section 27to detect the phase currents and the maximum width is determined basedon the minimum width. The two-phase PWM signal output pattern is dividedinto the patterns (0) to (9) depending upon the combination ofthree-phase duties corresponding to either the minimum width or themaximum width. Whether or not the current detection is carried out atthe fixed timing points or at the shifted timing points, according tothe patterns (0) to (9).

As a result, whether or not the other of current detection timing pointsshould be variable can be determined appropriately according to thecombination of PWM signals in the three-phase modulation. Further, thecurrent detection can be carried out with reliable determination evenwhen only a single phase current can substantially be detected under anovermodulated state in which the output voltage is extremely high, sothat results of current detection can be used for motor control as muchas possible.

Further, the air conditioner E includes the heat pump system constitutedby the compressor 2, the outdoor side heat exchanger 9, the decompressor8, the indoor side heat exchanger 7 and the like. The motor controldevice of the embodiment is provided for controlling the motor 4constituting the compressor 2. Accordingly, operating efficiencies ofthe heat pump system 1 and the air conditioner E can be improved.

FIGS. 19A to 33B illustrate a second embodiment. In the secondembodiment, identical or similar parts are labeled by the same referencesymbols as those in the first embodiment and the description of theidentical parts will be eliminated. Only the differences between thefirst and second embodiments will be described. For example, in pattern(1), a V-phase current is detected at the first detection timing pointand a U-phase (negative) current is detected at the second detectiontiming point. However, as shown in FIG. 19A, when the U-phase pulseapproximates to the minimum and the W-phase pulse approximates to themaximum, the U-phase current (negative) is also detected at the firstdetection timing point. In view of this inadequacy, the U-phase pulsewidth is subtracted from each one of the V-phase and W-phase pulsewidths and the U-phase pulse width is rendered zero in the secondembodiment so that a modulation manner is changed to a two-phasemodulation. The second detection timing point is shifted to a variabletiming point by subtracting the minimum width from W0_bai, so that theV-phase current and the U-phase current (negative) are detected.

Further, in pattern (3), the U-phase current is detected at the firstdetection timing point and the V-phase current (negative) is detected atthe second detection timing point. However, as shown in FIG. 19B, whenboth U-phase pulse and W-phase pulse approximate to the respectivemaximums, the V-phase current (negative) is also detected at the firstdetection timing point. In this case, the V-phase pulse width issubtracted from each one of the U-phase and W-phase pulse widths and theV-phase pulse width is rendered zero so that a modulation manner ischanged to a two-phase modulation. The first and second detection timingpoints are fixed and the U-phase current and the V-phase current(negative) are detected as before.

In pattern (5), the W-phase current (negative) is detected at the firstdetection timing point and the U-phase current is detected at the seconddetection timing point. However, as shown in FIG. 19C, when both U-phasepulse and V-phase pulse approximate to the respective maximums, theW-phase current (negative) is also detected at the second detectiontiming point. In this case, the W-phase pulse width is subtracted fromeach one of the U-phase and V-phase pulse widths and the W-phase pulsewidth is rendered zero so that a modulation manner is changed to atwo-phase modulation. The first and second detection timing points arefixed and the U-phase current and the V-phase current (negative) aredetected as before.

In pattern (7), the W-phase current (negative) can only be detected atthe first detection timing point as shown in FIG. 20A. In this case,too, as in pattern (5), the W-phase pulse width is subtracted from eachone of the U-phase and V-phase pulse widths and the W-phase pulse widthis rendered zero so that a modulation manner is changed to a two-phasemodulation. As a result, the U-phase current is detectable at the seconddetection timing point (fixed). In pattern (9), too, as shown in FIGS.20B and 20C, the U-phase pulse width is subtracted from each one of theV-phase and W-phase pulse widths and the U-phase pulse width is renderedzero so that a modulation manner is changed to a two-phase modulation.As a result, the V-phase current is detectable at the first detectiontiming point (fixed) when the V-phase current is larger than (>) theW-phase current. The W-phase current is detectable at the seconddetection timing point (variable) when the V-phase current is smallerthan (<) the W-phase current.

The following will describe processing procedures for realizing theforegoing current detecting manners. Referring to FIG. 21 correspondingto FIG. 3, start D is executed between steps S11 and S12 (step S15) andstart E is executed between steps S13 and S14 (step S16). Processingsteps are thus added. At start D, the patterns (0) to (9) are dividedinto channel patterns (0) to (10) (subpatterns: CH_Ptn). The term, “MAX”stands for 50% duty in the following description. The channel pattern(0) is inclusive of all patterns that do not fall into the channelpatterns (1) to (10).

<Pattern (1)>→Steps S81 and S82

U0+minimum width>MAX×2−W0_bai→channel pattern (1)

<Pattern (2)>→Steps S83 and S84

U0+minimum width>MAX×2−V0_bai→channel pattern (2)

<Pattern (3)>→Steps S85 and S86

V0_bai+minimum width>MAX×2−W0_bai→channel pattern (3)

<Pattern (4)>→Steps S87 and S88

Minimum width>MAX−U0→channel pattern (4)

<Pattern (5)>→Steps S89 and S90

W0_bai+minimum width>MAX×2−V0_bai→channel pattern (5)

<Pattern (6)>→Steps S91 and S92

Minimum width>MAX−U0→channel pattern (6)

<Pattern (7)>→Steps S93 and S94

Minimum width<MAX×2−V0_bai+W0_bai→channel pattern (7)

<Pattern (8)>→Steps S95 and S96

Minimum width<MAX×2−W0_bai+V0_bai→channel pattern (8)

<Pattern (9)>→Steps S97 to S100

V0_bai>W0_bai and minimum width>MAX×2−W0_bai+U0→channel pattern (9)

V0_bai≦W0_bai and minimum width>MAX×2−V0_bai+U0→channel pattern (10)

FIGS. 24 to 26 show processing of start B and correspond to FIGS. 11 and12. In FIG. 24, it is determined whether or not each one of the patterns(1) to (3) is a channel pattern (1), (2) or (3) (steps S101, S103 andS105). When each pattern is channel pattern (1) (YES at step S101), thefirst detection timing point is set to the minimum value (fixed) (stepS102). When each pattern is channel pattern (2) (YES at step S103), thesecond detection timing point is set to the minimum value (fixed)(S104). When each pattern is channel pattern (3) (YES at step S105), thefirst and second detection timing points are set to the minimum value(fixed) (step S106).

In FIG. 25, it is determined whether or not pattern (5) is channelpattern (5) (step S107). When pattern (5) is channel pattern (5) (YES),the first and second detection timing points are set to the minimumvalue (fixed) (step S108). Since each one of patterns (4) and (6) havethe same detection timing points as channel patterns (4) and (6)respectively, each one of patterns (4) and (6) is processed in the samemanner as in the first embodiment.

In FIG. 26, since patterns (7) and (8) become channel patterns (7) and(8) without any change respectively, the first and second detectiontiming points are set to the minimum value (fixed) (steps S109 andS110). Pattern (9) is either channel pattern 9 or 10. When pattern (9)is channel pattern (9), the first detection timing point is set to theminimum width (fixed) and the second detection timing point is set to avalue obtained by subtracting the maximum value of three-phase duty fromV0_bai and adding minimum width (variable) (step S112).

Further, when pattern (9) is channel pattern (10), the first detectiontiming point is set to a value obtained by subtracting the maximum valueof three-phase duty from W0_bai and adding minimum width (variable), andthe second detection timing point is set to the minimum width (fixed)(step S114).

FIG. 27 shows processing of start C and partially corresponds to FIG.15. In FIG. 27, it is determined whether or not each one of patterns (7)to (9) is channel pattern (7), (8), (9) or (10) (steps S117, S119, S121and S123). When each one of patterns (7) to (9) is channel pattern (7),the U-phase A/D converted value obtained at the second detection timingis substituted for the variable R_Iu at step S118. Further, the W-phaseA/D converted value obtained at the first detection timing point andnegativized is substituted for the variable R_Iw. A V-phase current R_Ivis obtained by R_Iv=−R_Iu−R_Iw.

When each one of patterns (7) to (9) is channel pattern (8), a V-phaseA/D converted value obtained at the second detection timing point andnegativized is substituted for the variable R_Iv and a U-phase A/Dconverted value obtained at the first detection timing point issubstituted for a variable R_Iu, at step S120. A W-phase current R_Iw isobtained by R_Iw=−R_Iu−R_Iv.

When each one of patterns (7) to (9) is channel pattern (9), a U-phaseA/D converted value obtained at the second detection timing point andnegativized is substituted for the variable R_Iu, at step S122. Further,a V-phase A/D converted value obtained at the first detection timingpoint is substituted for the variable R_Iv. A W-phase current R_Iw isobtained by R_Iw=−R_Iu−R_Iv.

When each one of patterns (7) to (9) is channel pattern (10), a W-phaseA/D converted value obtained at the second detection timing point issubstituted for the variable R_Iw. Further, a U-phase A/D convertedvalue obtained at the first detection timing point and negativized issubstituted for the variable R_Iu. A U-phase current R_Iv is obtained byR_Iv=−R_Iu−R_Iw.

When exceeding (MAX−minimum value), the second detection timing pointduring count-up is replaced by the value of (MAX−minimum value) althoughthis is not shown in the flowchart of start C. Further, when being lessthan 0, the second detection timing point is replaced by 0, so thatmalfunction is avoided. The same manner is applied to the (first)detection timing point during count-down.

FIG. 28 sows processing of start E. It is determined whether or not eachpattern is channel pattern (0) (step S131). When each pattern is channelpattern (0) (YES), the three-phase modulation is executed as in thefirst embodiment, so that U-, V- and W-phase duties are maintained. Onthe other hand, when each pattern is not channel pattern (0) (NO), thetwo-phase modulation is executed, so that a minimum of the U-, V- andW-phase duties is subtracted from each one of the duties (step S133).

FIGS. 29 and 30 show conditions on which the patterns (7) to (9) aredivided into channel patterns (7) to (10) and changes in the currentdetection timing points. Further, FIG. 31 shows PWM signal waveforms inthe case where three-phase modulation and two-phase modulation areexecuted by mixture, and FIGS. 32A and 32B are views similar to FIGS.18A and 18B, showing that the second embodiment can improve the currentdetection rate with the result of reduction in the waveform distortion.

According to the second embodiment, the PWM signal generation section 32subtracts the minimum duty of one of the three-phase PWM signals fromeach one of the remaining two phase duties, thereby generating two-phasePWM signals. The current detection timing point adjusting section 34detects current at the fixed detection timing point with respect to atleast one of the patterns of two-phase PWM signals. More specifically,the patterns (1) to (9) are divided into the channel patterns (0) to(10) and two-phase modulation is carried out depending upon the resultsof division, so that the current detection timing points and the currentphases to be detected are shifted. Accordingly, the current detectionefficiency can be improved in the embodiment as compared with theconventional art with the result that waveform distortion of the currentsupplied to the motor can be reduced.

FIGS. 33A to 43 show a third embodiment. In the third embodiment, theduty of one of three phases represents a value approximate to themaximum (a maximal phase), whereas duties of the other two phasesrepresent respective values approximate to the minimum (minimum phases).The third embodiment copes with a case where the duty difference isexcessively large. For example, in the case of pattern (1) as shown inFIG. 33A, the V-phase duty is larger and the U-phase and W-phase dutiesare smaller, and the V-phase current is disadvantageously detected atfirst and second detection timing points.

In view of the foregoing case, the V-phase duty is subtracted from 100%,and the resultant value is added to each phase duty. The V-phase dutybecomes 100%. Further, the increasing/decreasing direction of theU-phase duty is shifted to be opposed to that of the W-phase duty fromthe bottom of the triangular wave. Still further, the variable seconddetection timing point is shifted to be fixed, so that the U-phasecurrent (negative) is detected at the second detection timing point asbefore.

In the pattern (2) as shown in FIG. 33B, the W-phase duty is larger andthe U-phase and V-phase duties are smaller. In this case, the W-phasecurrent is disadvantageously detected at the first and second detectiontiming points. In view of this, the W-phase duty is subtracted from100%, and the resultant value is added to each phase duty in the samemanner as described above. The increasing/decreasing direction of theU-phase duty is shifted to be opposed to that of the V-phase duty fromthe bottom of the triangular wave. Still further, the variable firstdetection timing point is shifted to be fixed, so that the U-phasecurrent (negative) is detected at the second detection timing point asbefore.

In the pattern (3) as shown in FIG. 34A, the U-phase duty is larger andthe V-phase and W-phase duties are smaller. In this case, the U-phasecurrent is disadvantageously detected at the first and second detectiontiming points. In view of this, the W-phase duty is subtracted from100%, and the resultant value is added to each phase duty. The V-phasecurrent (negative) is detected at the second detection timing point. Inthis case, the U-phase duty is not shifted.

In the pattern (4) as shown in FIG. 34B, the W-phase duty is larger andthe U-phase and V-phase duties are smaller. In this case, the W-phasecurrent is disadvantageously detected at the first and second detectiontiming points. In view of this, the W-phase duty is subtracted from100%, and the resultant value is added to each phase duty. Theincreasing/decreasing direction of the U-phase duty is shifted to beopposed to that of the V-phase duty from the bottom of the triangularwave. The V-phase current (negative) is detected at the second detectiontiming point.

In the pattern (5) as shown in FIG. 35A, the U-phase duty is larger andthe V-phase and W-phase duties are smaller. In this case, the U-phasecurrent is disadvantageously detected at the first and second detectiontiming points. In view of this, the U-phase duty is subtracted from100%, and the resultant value is added to each phase duty. The W-phasecurrent (negative) is detected at the first detection timing point. Inthis case, the U-phase duty is not shifted.

In the pattern (6) as shown in FIG. 35B, the V-phase duty is larger andthe U-phase and W-phase duties are smaller. In this case, the V-phasecurrent is disadvantageously detected at the first and second detectiontiming points. In view of this, the V-phase duty is subtracted from100%, and the resultant value is added to each phase duty. Theincreasing/decreasing direction of the U-phase duty is shifted to beopposed to that of the W-phase duty from the bottom of the triangularwave. The W-phase current (negative) is detected at the first detectiontiming point. The above-described processing need not be carried outregarding the patterns (7) to (9).

The processing to achieve the foregoing operation will now be describedwith reference to FIGS. 36 to 42. In start D, as shown in FIG. 36,patterns (0) to (6) are divided into channel patterns (subpatterns:CH_Ptn2) (0) to (6) differing from those in the second embodiment. Thechannel pattern (0) is inclusive of all patterns that do not fall intothe channel patterns (1) to (6).

<Pattern (1)>→Steps S81, S141 and S142

W0_bai−minimum width<U0 and V0_bai<MAX×2 (100%)→channel pattern (1)

<Pattern (2)>→Steps S83, S143 and S144

V0_bai−minimum width<U0 and V0_bai<MAX×2→channel pattern (2)

<Pattern (3)>→Steps S85, S145 and S146

Minimum width>W0_bai and U0_bai<MAX×2→channel pattern (3)

<Pattern (4)>→Steps S87, S147 and S148

Minimum width>U0_bai and W0_bai<MAX×2→channel pattern (4)

<Pattern (5)>→Steps S89, S149 and S150

Minimum width>V0_bai and U0_bai<MAX×2→channel pattern (5)

<Pattern (6)>→Steps S89, S149 and S150

Minimum width>U0 and V0_bai<MAX×2→channel pattern (6)

FIGS. 37 and 38 show processing of start B and correspond to FIGS. 24and 25. It is determined whether or not patterns (1), (2) and (6) arechannel patterns (1), (2) and (6) respectively (steps S101′, S103′ andS155). When the pattern (1) is the channel pattern (1) (YES at stepS101′), the first detection timing point is set to (U0+minimum value)and the second detection timing point is set to the minimum value (stepS153). Further, when the pattern (2) is the channel pattern (2) (YES atstep S103′), the first detection timing point is set to the minimumvalue and the second detection timing point is set to (U0+minimum value)(step S154). When the pattern (6) is the channel pattern (6) (YES atstep S155), the first detection timing point is set to the minimum valueand the second detection timing point is set to (U0+minimum value) (stepS156). The remainder is processed in the same manner as in the secondembodiment.

Start E as shown in FIGS. 39 and 40 is the processing of addition to theduties according to channel patterns (1) to (6).

<Channel Pattern (1)>→Steps S161 and S162

V0_bai is subtracted from 100% and the result of subtraction is added toeach one of the U-phase, V-phase and W-phase duties.

<Channel Pattern (2)>→Steps S163 and S164

W0_bai is subtracted from 100% and the result of subtraction is added toeach one of the U-phase, V-phase and W-phase duties.

<Channel Pattern (3)>→Steps S165 and S166

U0_bai is subtracted from 100% and the result of subtraction is added toeach one of the U-phase, V-phase and W-phase duties.

<Channel Pattern (4)>→Steps S167 and S168

W0_bai is subtracted from 100% and the result of subtraction is added toeach one of the U-phase, V-phase and W-phase duties.

<Channel Pattern (5)>→Steps S169 and S170

V0_bai is subtracted from 100% and the result of subtraction is added toeach one of the U-phase, V-phase and W-phase duties.

<Channel Pattern (6)>→Steps S171 and S172

V0_bai is subtracted from 100% and the result of subtraction is added toeach one of the U-phase, V-phase and W-phase duties.

FIG. 41 show the process of shifting the increasing/decreasing directionof U-phase duty within step S9 (first half of carrier period).

<Channel Pattern (1)>→Steps S181 and S182

(U0×2) corresponds to the U-phase duty. “Set_duty_U_phase 0 (U0_bai)” atstep S192 indicates that U0_bai is output in the first half of carrierperiod so that the U-phase duty is output in the direction opposed tothat of the W-phase duty on the basis of the bottom of the triangularwave.

<Channel Pattern (2)>→Steps S183 and S184

“Set_duty_U_phase 0 (0)” at step S194 indicates that the U-phase duty isnot output in the first half of carrier period. U0_bai is to be outputin the last half of carrier period.

<Channel Pattern (4)>→Steps S195 and S196

The same processing is carried out at step S196 as at step S194.

<Channel Pattern (6)>→Steps S187 and S188

The same processing is carried out at step S198 as at step S192.

Regarding the channel patterns other than (1), (2), (4) and (6), stepS189 is determined as SET_DUTY_U_PHASE0(U0), which indicates that theU-phase duty is normally increased/decreased in both directions from thebottom of the amplitude of triangular waves.

FIG. 42 shows a process of shifting the increasing/decreasing directionof the U-phase duty pulses at step S10 (in the last half of the carrierperiod).

<Channel Pattern (1)>→Steps S191 and D192

No U-phase duty is output in the last half of the carrier period. U0_baiis output in the first half of the carrier period.

<Channel Pattern (2)>→Steps S193 and D194

U0_bai is output in the last half of the carrier period. No U-phase dutyis output in the first half of the carrier period.

<Channel Pattern (4)>→Steps S195 and D196

The same processing is carried out at step S196 as at step S194.

<Channel Pattern (6)>→Steps S197 and D198

The same processing is carried out at step S198 as at step S192.

Regarding the channel patterns other than (1), (2), (4) and (6), thesame processing is carried out at step S199 as at step S189.

FIGS. 43A and 43B show three-phase PWM patterns in the case of actualapplication of the processing of the third embodiment. FIG. 43B is apartially enlarged view of FIG. 43A. The W-phase duty is 100%. TheU-phase duty pulse is shifted to be output in a direction opposed tothat of the V-phase duty pulse on the basis of the bottom of thetriangular wave.

According to the third embodiment, when the duty of one of three-phasePWM signals becomes larger than those of the other two phases, theformer will be referred to as “maximal phase” and the latter will bereferred to as “minimal phases.” When two-phase currents detected at thefirst and second detection timing points belong to the same phase, thedifference obtained by subtracting the duty of the maximal phase fromthe maximum duty (100%) is added to each phase duty. Further, when themaximal phase is the V-phase or the W-phase, the U-phase duty pulse isshifted to be increased/decreased in the direction opposed to the otherminimal phases. Regarding the three-phase PWM signal pattern after theaddition of the difference, at least one of two times of currentdetection is carried out at a predetermined fixed timing point. Morespecifically, in the processing of start D, the patterns (0) to (6) aredivided into the channel patterns (0) to (6), and the foregoingprocessing is carried out according to the results of division. This canalso improve the current detection efficiency.

The correspondence relationship between the first, second and thirdphases and the U-, V- and W-phases are optional.

First to third embodiments described in Japanese Patent No. 178799 maybe applied to the method of determining the arrangement of phase dutypulses.

The peak of the triangular carrier wave may be a center of the period.Further, the carrier period and the minimum width of the PWM duty mayappropriately be changed depending on the individual design.

The motor control device should not be limited to the application to theair conditioner but may be applied to equipment in which an electricmotor is controlled by a three-phase modulation method.

While certain embodiments have been described, these embodiments havebeen presented by way of example only, and are not intended to limit thescope of the invention. Indeed, the novel embodiments described hereinmay be embodied in a variety of other forms; furthermore, variousomissions, substitutions and changes in the form of the embodimentsdescribed herein may be made without departing from the spirit of theinvention. The accompanying claims and their equivalents are intended tocover such forms or modifications as would fall within the scope andspirit of the invention.

What is claimed is:
 1. A motor control device comprising: a currentdetecting element connected to a direct current side of an invertercircuit including a plurality of switching elements connected into athree-phase bridge configuration, the switching elements beingconfigured to be on-off controlled according to a predetermined PWMsignal pattern so that the inverter circuit converts direct current tothree-phase alternating current, the current detecting elementgenerating a signal corresponding to a current value; a rotor positiondetermination unit configured to determine a rotor position based onphase currents of an electric motor driven by the inverter circuit; aPWM signal generation unit configured to generate a three-phase PWMsignal pattern so that the pattern follows the rotor position; a currentdetection unit configured to detect the phase currents based on a signalgenerated by the current detecting element and the PWM signal pattern,wherein the PWM signal generation unit is configured toincrease/decrease a duty in both directions of phase lag side and phaselead side with reference to any phase of the carrier-wave periodregarding a first phase of the three-phase PWM signal pattern; whereinthe PWM signal generation unit is configured to increase/decrease a dutyin one of the directions of phase lag side and phase lead side withreference to any phase of the carrier-wave period regarding a secondphase of the three-phase PWM signal pattern; wherein the PWM signalgeneration unit is configured to increase/decrease a duty in a directionopposite to the direction of the second phase with reference to anyphase of the carrier-wave period regarding a third phase of thethree-phase PWM signal pattern; and wherein the current detection unithas a timing point adjusting unit configured to detect two-phasecurrents at timing points fixed in the carrier-wave period of the PWMsignal and to adjust a detection timing point so that the current isdetectable at a variable timing point according to a magnitude of anoutput voltage supplied to the inverter circuit regarding at least onephase when the two-phase currents become undetectable at the fixedtiming points.
 2. The motor control device according to claim 1, whereinthe timing point adjusting unit is configured to determine whether ornot the current detection is based on the fixed timing points or timingpoints shifted from the fixed timing points, according to thethree-phase PWM signal pattern.
 3. The motor control device according toclaim 2, wherein when the current detection unit sets acurrent-detectable minimum duty to a minimum width and executessubtraction of the minimum width from a maximum duty (100%) and sets aresult of the subtraction to a maximum width, the timing point adjustingunit divides an output pattern of the three-phase PWM signal intofollowing patterns (1) to (0) of first to third duties: (1) a case wherethe first phase duty is less than the minimum width, and the secondphase duty is larger than the third phase duty or equal to or largerthan the maximum width, and the third phase duty is larger than thefirst phase duty; (2) a case where the first phase duty is less than theminimum width, and the third phase duty is larger than the second phaseduty or equal to or larger than the maximum width, and the second phaseduty is larger than the first phase duty; (3) a case where the secondphase duty is less than the minimum width, and the first phase duty islarger than the third phase duty; (4) a case where the second phase dutyis less than the minimum width, the third phase duty is larger than thefirst phase duty or equal to or larger than the maximum width, and thefirst phase duty is larger than the second phase duty; (5) a case wherethe third phase duty is less than the minimum width and the first phaseduty is larger than the second phase duty; (6) a case where the thirdphase duty is less than the minimum width, and the second phase duty islarger than the first phase duty or equal to or larger than the maximumwidth, and the third phase duty is smaller than the first phase duty;(7) a case where the first phase duty and the second phase duty areequal to or larger than the maximum width; (8) a case where the firstphase duty and the third phase duty are equal to or larger than themaximum width; (9) a case where the second phase duty and the thirdphase duty are equal to or larger than the maximum width; and (0) anycase other than the cases (1) to (9), and wherein the timing pointadjusting unit is configured to determine whether or not the currentdetection is based on the fixed timing points or timing points shiftedfrom the fixed timing points, according to the patterns (1) to (0). 4.The motor control device according to claim 1, wherein the PWM signalgeneration unit is configured to subtract the duty of one phase which isminimum from the duties of the other two phases, thereby shifting thethree-phase PWM signal pattern so that two-phase PWM signals aregenerated, and the timing point adjusting unit is configured to carryout detection of at least one of two-phase currents at a predeterminedfixed timing point regarding the shifted two-phase PWM signal pattern.5. The motor control device according to claim 4, wherein the PWM signalgeneration unit divides the patterns (1) to (9) into followingsubpatterns (0) to (10): (1) a case where in pattern (1), a sum of onehalf of the first phase duty and the minimum width is larger than adifference obtained by subtracting the third phase duty from the maximumduty (100%); (2) a case where in pattern (2), a sum of one half of thefirst phase duty and the minimum width is larger than a differenceobtained by subtracting the second phase duty from the maximum duty; (3)a case where in pattern (3), a sum of the second phase duty and theminimum width is larger than a difference obtained by subtracting thethird phase duty from the maximum duty; (4) a case where in pattern (4),the minimum width is larger than a difference obtained by subtractingone half of the first phase duty from the maximum width; (5) a casewhere in pattern (5), a sum of the third phase duty and the minimumwidth is larger than a difference obtained by subtracting the secondphase duty from the maximum duty; (6) a case where in pattern (6), theminimum width is larger than a difference obtained by subtracting onehalf of the first phase duty from the maximum width; (7) a case where inpattern (7), the minimum width is smaller than a sum of a differenceobtained by subtracting the second phase duty from the maximum duty andthe third phase duty; (8) a case where in pattern (8), the minimum widthis smaller than a sum of a difference obtained by subtracting the thirdphase duty from the maximum duty and the second phase duty; (9) a casewhere in pattern (9), the second phase duty is larger than the thirdphase duty and the minimum width is larger than a sum of a differenceobtained by subtracting the third phase duty from the maximum duty andthe first phase duty; (10) a case where in pattern (9), the second phaseduty is equal to or smaller than the third phase duty and the minimumwidth is larger than a sum of a difference obtained by subtracting thesecond phase duty from the maximum duty and the first phase duty; and(0) any case other than the subpatterns (1) to (10), and wherein thetiming point adjusting unit is configured to determine whether or notthe current detection is based on the fixed timing points or timingpoints shifted from the fixed timing points, according to thesubpatterns (1) to (10).
 6. The motor control device according to claim1, wherein when the duty of one of three-phase PWM signals is largerthan the duties of the other two-phase PWM signals, so that thetwo-phase currents detected at the timing points adjusted by the timingpoint adjusting unit belong to the same phase and when the former phasewith the larger duty will be referred to as a maximal phase and thelatter phases will be referred to as minimal phases, the PWM signalgeneration unit is configured to shift the three-phase PWM signalpattern so that a difference obtained by subtracting the duty of themaximal phase from the maximum duty (100%) is added to each one of thethree-phase duties, wherein when the maximal phase is the second phaseor the third phase, the PWM signal generation unit is configured toshift the three-phase PWM signal pattern so that the duty of the firstphase is increased/decreased in a direction opposed to the other minimalphases with reference to the phase of the carrier-wave period, andwherein the timing point adjusting unit is configured to carry outdetection of at least one of the three-phase currents at a predeterminedfixed timing point regarding the three-phase PWM signal pattern afteroccurrence of the addition.
 7. The motor control device according toclaim 6, wherein the PWM signal generation unit is configured to dividethe patterns (1) to (6) into following subpatterns (0) to (6): (1) acase where in the pattern (1), a difference obtained by subtracting theminimum width from the third phase duty is larger than the first phaseduty and the second phase duty is less than the maximum duty; (2) a casewhere in the pattern (2), a difference obtained by subtracting theminimum width from the second phase duty is larger than the first phaseduty and the second phase duty is less than the maximum duty; (3) a casewhere in the pattern (3), the third phase duty is less than the minimumwidth and the first phase duty is less than the maximum duty; (4) a casewhere in the pattern (4), the first phase duty is less than the minimumwidth and the third phase duty is less than the maximum duty; (5) a casewhere in the pattern (5), the second phase duty is less than the minimumwidth and the first phase duty is less than the maximum duty; (6) a casewhere in the pattern (6), the first phase duty is less than the minimumwidth and the second phase duty is less than the maximum duty; and (0)any case other than the subpatterns (0) to (6), wherein the PWM signalgeneration unit is configured to determine whether or not the differenceobtained by subtracting the duty of the maximal phase from the maximumduty (100%) is added to each one of the three-phase duties and whetheror not an increasing/decreasing direction of the first phase duty isshifted, according to the subpatterns (0) to (6); and wherein the timingpoint adjusting unit is configured to determine whether or not thecurrent detection is carried out at the predetermined fixed timing pointor at a timing point obtained by shifting the fixed timing point,depending on the subpatterns (0) to (6).
 8. An air conditionercomprising: a heat pump system including a compressor, an outdoor sideheat exchanger, a decompressor and an indoor side heat exchanger; aninverter circuit configured to on-off controlling a plurality ofthree-phase bridge-connected switching elements according to apredetermined PWM signal pattern, thereby converting a direct current toa three-phase alternating current; a current detecting element connectedto the direct current side to generate a signal corresponding to acurrent value; a rotor position determination unit configured todetermine a rotor position based on phase currents of an electric motorconfiguring the compressor and driven by the inverter circuit; a PWMsignal generation unit configured to generate a three-phase PWM signalpattern so that the pattern follows the rotor position; a currentdetection unit configured to detect the phase currents based on a signalgenerated by the current detecting element and the PWM signal pattern,wherein the PWM signal generation unit is configured toincrease/decrease a duty in both directions of phase lag side and phaselead side with reference to any phase of the carrier-wave periodregarding a first phase of the three-phase PWM signal pattern; whereinthe PWM signal generation unit is configured to increase/decrease a dutyin one of the directions of phase lag side and phase lead side withreference to any phase of the carrier-wave period regarding a secondphase of the three-phase PWM signal pattern; wherein the PWM signalgeneration unit is configured to increase/decrease a duty in a directionopposite to the direction of the second phase with reference to anyphase of the carrier-wave period regarding a third phase of thethree-phase PWM signal pattern; and wherein the current detection unithas a timing point adjusting unit configured to detect two-phasecurrents at timing points fixed in the carrier-wave period of the PWMsignal and to adjust a detection timing point so that the current isdetectable at a variable timing point according to a magnitude of anoutput voltage supplied to the inverter circuit regarding at least onephase when the two-phase currents become undetectable at the fixedtiming points.